package com.yootk.editor;

import com.yootk.vo.Address;
import org.springframework.beans.PropertyEditorRegistrar;
import org.springframework.beans.PropertyEditorRegistry;

/**
 * 属性编辑器的注册管理器
 */
public class AddressPropertyEditorRegistrar implements PropertyEditorRegistrar {

    @Override
    public void registerCustomEditors(PropertyEditorRegistry registry) {
        // 根据Address类型匹配，如果发现要进行此类型对象的操作，则自动找到匹配的编辑器
        registry.registerCustomEditor(Address.class, new AddressPropertyEdit());
    }
}
